﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
using Treinamento2015_01Core.Models;

namespace Treinamento2015_01.Models
{
    public class ProductViewModel
    {
        [Key]
        public int Id { get; set; }

        [Display(ResourceType = typeof(Resources.General.Resource), Name = "Name")]
        [Required]
        public string Name { get; set; }

        [Display(ResourceType = typeof(Resources.General.Resource), Name = "IsActive")]
        public bool IsActive { get; set; }

        [Display(ResourceType = typeof(Resources.General.Resource), Name = "Manufacturer")]
        public ManufacturerViewModel Manufacturer { get; set; }

        [Display(ResourceType = typeof(Resources.General.Resource), Name = "Manufacturer")]
        [Required]
        public int ManufacturerId { get; set; }

        [Display(ResourceType = typeof(Resources.General.Resource), Name = "ProductType")]
        public ProductTypeViewModel ProductType { get; set; }

        [Display(ResourceType = typeof(Resources.General.Resource), Name = "ProductType")]
        [Required]
        public int ProductTypeId { get; set; }

        [Display(ResourceType = typeof(Resources.General.Resource), Name = "Price")]
        [Required]
        public String Price { get; set; }

        [Display(ResourceType = typeof(Resources.General.Resource), Name = "CreationDate")]
        public DateTime CreationDate { get; set; }

        [Display(ResourceType = typeof(Resources.General.Resource), Name = "ModificationDate")]
        public DateTime ModificationDate { get; set; }
    }
}